﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using FizzWare.NBuilder;
using MvcApplication1.Models;

namespace MvcApplication1.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Product()
        {
            Product p = Builder<Product>.CreateNew().Build();
            Category c = Builder<Category>.CreateNew().Build();
            return View(new ProductView { CurrentCategory = c, CurrentProduct = p } );
        }

        public ActionResult Index()
        {
            return View();
        }
        public JavaScriptResult SayHello()
        {
            return JavaScript("alert('hello world!');");
        }

        public ActionResult Address()
        {
            return View(Address());
        }
    }
}
